﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>消息中心</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link href="/peopleList/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/peopleList/js/jquery-3.3.1.min.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>

</head>
<script>
    $(function () {
        //查询点赞的游记
        $.get("/users/praises",{type:1},function (data) {
            console.log(data);
            if (!data) {
                $("#listUser").css("display","none");
            }else {
                var dataList = {list:data};
                $("#listUser").renderValues(dataList,{
                    getId:function (item, value) {
                        $(item).attr("data-tid",value);
                    }
                });
                //绑定点击事件
                $(".travelPraise").click(function () {
                    var tid = $(this).data("tid");
                    //查询后,将状态改为已读
                    $.ajax({
                        type: "put",
                        url: "/users/updatePraiseState",
                        data:{
                            praiseId:tid
                        },
                        success: function (data) {
                            if (data.success) {
                                window.location.href = "/travelContent.html?id="+tid;
                            }
                        }
                    })
                });
            }

        });
    })

</script>
<body>


<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed">
        <a href="/mine/praiseSort.html">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">赞我的</span>
        </div>
        <a href="javascript:;" class="aui-navBar-item">
            <i class="icon icon-more"></i>
        </a>
    </header>
    <section class="aui-scrollView">
        <div class="aui-tab" data-ydui-tab>
            <div class="tab-panel" id="listUser">
                <div class="tab-panel-item tab-active"  render-loop="list">
                    <div render-key="list.travel.id" render-fun="getId" class="aui-flex b-line travelPraise">
                        <span style="display: none" render-html="list.id"></span>
                        <div class="aui-look-img" >
                            <img render-src="list.praiseUser.headImgUrl" alt="">
                        </div>
                        <div class="aui-flex-box">
                            <h4 render-html="list.praiseUser.nickName"></h4>
                            <p>暂无消息</p>
                            <span class="glyphicon glyphicon-heart"></span>
                            <p render-html="list.createTime" style="font-size: 12px"></p>
                        </div>
                        <div class="aui-look-img" style="text-align: right">
                            <img render-src="list.travel.coverUrl" alt="">
                        </div>
                    </div>
                    <!--<a href="javascript:;" class="aui-flex b-line">-->
                        <!--<div class="aui-look-img">-->
                            <!--<img src="/peopleList/images/icon-img-002.png" alt="">-->
                            <!--<span class="aui-look-tag">3</span>-->
                        <!--</div>-->
                        <!--<div class="aui-flex-box">-->
                            <!--<h3>小招头条</h3>-->
                            <!--<p>社保征管g改革担忧，对你有啥影响没有呀社保征管g改革担忧，对你有啥影响没有呀</p>-->
                        <!--</div>-->
                    <!--</a>-->
                </div>
                    <!--<div class="tab-panel-item">-->
                        <!--<a href="javascript:;" class="aui-flex b-line">-->
                            <!--<div class="aui-look-img">-->
                                <!--<img src="/peopleList/images/icon-img-002.png" alt="">-->
                                <!--<span class="aui-look-tag">3</span>-->
                            <!--</div>-->
                            <!--<div class="aui-flex-box">-->
                                <!--<h3>小招头条</h3>-->
                                <!--<p>社保征管g改革担忧，对你有啥影响没有呀社保征管g改革担忧，对你有啥影响没有呀</p>-->
                            <!--</div>-->
                        <!--</a>-->
                    <!--</div>-->
                    <!--<div class="tab-panel-item">-->
                        <!--<a href="javascript:;" class="aui-flex b-line">-->
                            <!--<div class="aui-look-img">-->
                                <!--<img src="/peopleList/images/icon-img-002.png" alt="">-->
                                <!--<span class="aui-look-tag">3</span>-->
                            <!--</div>-->
                            <!--<div class="aui-flex-box">-->
                                <!--<h3>小招头条</h3>-->
                                <!--<p>社保征管g改革担忧，对你有啥影响没有呀社保征管g改革担忧，对你有啥影响没有呀</p>-->
                            <!--</div>-->
                        <!--</a>-->
                    <!--</div>-->
            </div>
        </div>
    </section>
</section>

</body>
</html>
